package com.example.basics.controller;

import com.example.basics.model.Student;
import com.example.basics.prevent.AvoidReSubmit;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping("/update")
    @AvoidReSubmit(expireTime = 1000 * 3)
    public String update(@RequestBody Student student) {
        System.out.println("修改成功");
        return "Done";
    }

}
